<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="index.css" />
	</head>
	<body>
		<!-- 审批属性设置 -->
		<div class="approval-attributes" v-show="approvalAttributeDisplay" id="approvalAttribute"
			style="display: block;">
			<div class="mask"></div>
			<div class="approval-editor-drawer">
				<div class="approval-editor-content">
					<div class="approval-editor-name-wrapper">
						<div class="approval-editor-name">
							<input v-model="approvalData.approvalName" class="approval-name-editor-input readonly"
								type="text">
						</div>
					</div>
					<!-- 条件分支 -->
					<div class="approval-editor-form" v-if="approvalData.flowType==='condition'">
						<div class="item-content more-info">
							<p>满足以下条件时进入当前分支</p>
						</div>
						<div class="panel">
							<div class="header">
								<span>条件组</span>
							</div>
							<div class="content">
								<div class="item-content more-info">
									<p>当</p>
								</div>
								<div class="condition-groups" v-for="conditionGroup in approvalData.conditionGroups">
									<div class="condition-group" v-for="(condition,index) in conditionGroup">
										<div class="item-content more-info" v-if="index>0">
											<p>且</p>
										</div>
										<select>
											<option value="提交人">提交人</option>
											<option value="收款发生日期">收款发生日期</option>
											<option value="收款类别">收款类别</option>
											<option value="收款金额">收款金额</option>
											<option value="归属人">归属人</option>
										</select>
										<select>
											<option value="早于">早于</option>
											<option value="晚于">晚于</option>
											<option value="等于">等于</option>
										</select>
										<select>
											<option value ="审批提交时间">审批提交时间</option>
										</select>
									</div>
									<div class="add-approver-setting">
										<div class="add-operator" @click="addCondition(conditionGroup)">＋ 添加条件</div>
									</div>
								</div>
								
							</div>
						</div>
					</div>
					<div class="approval-editor-form">
						<div class="item-wrapper">
							<div class="approval-type-wrapper" v-if="approvalData.flowType==='approval'">
								<div class="item-key-wrapper">
									<div class="item-key">审批类型</div>
									<label>
										<input value="不计入审批效率统计" type="checkbox">
										<span>不计入审批效率统计</span>
									</label>
								</div>
								<div class="item-content">
									<div class="radio-line-group">
										<label>
											<input value="人工审批" v-model="approvalData.approvalMethod" type="radio">
											<span>人工审批</span>
										</label>
										<label>
											<input v-model="approvalData.approvalMethod" type="radio">
											<span>自动通过</span>
										</label>
										<label>
											<input v-model="approvalData.approvalMethod" type="radio">
											<span>自动拒绝</span>
										</label>
									</div>
								</div>
							</div>
						</div>
						<div>
							<div class="approval-editor-tab-wrapper"  v-if="approvalData.flowType==='approval' || approvalData.flowType==='cc'" >
								<div class="approval-function-btn-group">
									<div class="btn approval-function-btn active">设置审批人</div>
									<div class="btn approval-function-btn ">表单权限</div>
									<div class="btn approval-function-btn " v-if="approvalData.flowType==='approval'">操作权限</div>
								</div>
								<div class="approval-function-content-approver-set setting-panel">
									<div class="approvers-container" v-if="approvalData.flowType==='approval'">
										<div class="approval-function-setting-content"
											v-for="approver in approvalData.approvalTargets">
											<div class="approver-setting">
												<div class="header">
													<span>审批人</span>
													<span class="close-btn" @click="removeApprover(approver)" v-if="approvalData.approvalTargets.length>1">×</span>
												</div>
												<div class="radio-line-group">
													<label v-for="target in approvalConfig.approvalTargets">
														<input :value="target" v-model="approver.target" type="radio">
														<span>{{target}}</span>
													</label>
												</div>
												<div class="sub-content">
													<div class="sub-content-top-line"></div>
													<div class="sub-approver approver-user-selector add-user"
														v-show="approver.target=='指定成员'">
														<p>
															<span>添加成员</span>
															<span class="light-text">（不能超过25人）</span>
														</p>
														<div class="add-approver-wrapper">
															<div class="add-approver-btn"
																@click="addApprover(approver.users)">+</div>
															<div class="add-approver-item"
																v-for="user in approver.users">
																<img
																	src="https://s3-imfile.feishucdn.com/static-resource/v1/v2_4cb935f7-a445-4c1f-a40c-ed52e7f0eb7g~?image_size=32x32&amp;cut_type=&amp;quality=&amp;format=image&amp;sticker_format=.webp">
																<div>{{user}}</div>
																<div class="close-btn">×</div>
															</div>
														</div>
													</div>
													<div class="sub-approver approver-user-selector role-user"
														v-show="approver.target=='角色'">
														<p>选择角色</p>
														<div class="add-approver-wrapper role-selector-wrapper">
															<div class="radio-line-group">
																<label>
																	<input value="单选"
																		name="fanwei-grouply1kedkhocyn7jao17i"
																		checked="true" type="radio">
																	<span>单选</span>
																</label>
																<label>
																	<input value="多选"
																		name="fanwei-grouply1kedkhocyn7jao17i"
																		type="radio">
																	<span>多选</span>
																</label>
															</div>
														</div>
														<p class="选择范围"></p>
														<div class="add-approver-wrapper role-selector-wrapper">
															<div class="radio-line-group" style="display: none;">
																<label>
																	<input value="全公司"
																		name="role-grouply1kedkhhjfsf44ewi"
																		checked="true" type="radio">
																	<span>全公司</span>
																</label>
																<label>
																	<input value="指定成员"
																		name="role-grouply1kedkhhjfsf44ewi"
																		type="radio">
																	<span class="">指定成员</span>
																</label>
																<label>
																	<input value="指定角色"
																		name="role-grouply1kedkhhjfsf44ewi"
																		type="radio">
																	<span>指定角色</span>
																</label>
															</div>
														</div>
														<div class="sub-approver approver-user-selector add-user"
															style="display: none;">
															<p>
																<span>添加成员</span>
																<span class="light-text">（不能超过25人）</span>
															</p>
															<div class="add-approver-wrapper">
																<div class="add-approver-btn">+</div>
															</div>
														</div>
													</div>
													<div class="sub-approver approver-user-selector user-group"
														v-show="approver.target=='用户组'">
														<p>用户组</p>
														<div class="add-approver-wrapper usergroup-selector-wrapper">
															<div class="supervisor-select">
																<select>
																	<option>用户组1</option>
																	<option>用户组2</option>
																	<option>用户组3</option>
																</select>
															</div>
														</div>
														<div class="role-info">
															<span>仅展示可见范围内的用户组，可前往</span>
															<a href="https://www.baidu.com">管理后台</a>
															<span>进行配置</span>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="add-approver-setting" v-if="approvalData.flowType==='approval'">
										<div class="add-operator" @click="addApproverTargetPanel">＋ 添加审批人</div>
									</div>
								</div>
								<div class="item-wrapper" v-if="approvalData.approverMultipleWhen">
									<div class="item-key">多人审批时</div>
									<div class="item-content">
										<div class="radio-line-group">
											<label class=" display-block">
												<input value="会签" v-model="approvalData.approverMultipleWhen.action"
													name="approvel-typely1kedkij9vggj6wxdk" type="radio">
												<span>会签（需所有人审批人同意）</span>
											</label>
											<label class=" display-block">
												<input value="或签（一名审批人同意即可）"
													v-model="approvalData.approverMultipleWhen.action"
													name="approvel-typely1kedkij9vggj6wxdk" type="radio">
												<span>或签（一名审批人同意即可）</span>
											</label>
											<label class=" display-block">
												<input value="依次审批" v-model="approvalData.approverMultipleWhen.action"
													class="approvel-typely1kedkij9vggj6wxdk" type="radio">
												<span>依次审批（按顺序依次审批）</span>
											</label>
										</div>
									</div>
								</div>
								<div class="item-wrapper" v-if="approvalData.approverNoExistWhen">
									<div class="item-key">审批人为空时</div>
									<div class="item-content">
										<div class="radio-line-group">
											<label>
												<input value="自动通过" name="approvel-typely1kedkiyb5ike3v0ce"
													v-model="approvalData.approverNoExistWhen.action" type="radio">
												<span>自动通过</span>
											</label>
											<label>
												<input value="指定人员审批" v-model="approvalData.approverNoExistWhen.action"
													name="approvel-type" type="radio">
												<span>指定人员审批</span>
											</label>
											<label>
												<input value="转交给管理员审批"
													v-model="approvalData.approverNoExistWhen.action"
													name="approvel-type" type="radio">
												<span>转交给管理员审批</span>
											</label>
										</div>
										<div class="sub-approver approver-user-selector add-user"
											v-show="approvalData.approverNoExistWhen.action=='指定人员审批'">
											<p>
												<span>添加成员</span>
												<span class="light-text">（不能超过25人）</span>
											</p>
											<div class="add-approver-wrapper">
												<div class="add-approver-btn">+</div>
											</div>
										</div>
									</div>
								</div>
								<div class="item-wrapper" v-if="approvalData.approverPresentWhen">
									<div class="item-key">审批人与提交人为同一人时</div>
									<div class="item-content">
										<div class="radio-line-group">
											<label>
												<input v-model="approvalData.approverPresentWhen.action"
													value="由提交人自己审批" name="approvel-typely1kedki5xrabhp4iu8"
													type="radio">
												<span>由提交人自己审批</span>
											</label>
											<label>
												<input v-model="approvalData.approverPresentWhen.action" value="自动跳过"
													name="approvel-typely1kedki5xrabhp4iu8" type="radio">
												<span>自动跳过</span>
											</label>
											<label>
												<input v-model="approvalData.approverPresentWhen.action" value="转交给直属上级"
													name="approvel-typely1kedki5xrabhp4iu8" type="radio">
												<span>转交给直属上级</span>
											</label>
											<label>
												<input v-model="approvalData.approverPresentWhen.action"
													value="转交部门负责人审批" name="approvel-typely1kedki5xrabhp4iu8"
													type="radio">
												<span>转交部门负责人审批</span>
											</label>
										</div>
									</div>
								</div>
								<div class="item-wrapper" v-if="approvalData.flowType==='approval'">
									<div class="item-key">提示</div>
									<div class="item-content more-info">
										<p>若审批人离职，会自动转交给审批人的上级代为处理</p>
										<p><span>若同一审批人在流程中重复出现，默认只审批一次。可前往</span><span
												class="goto-other-setting">更多设置</span><span>修改</span></p>
									</div>
								</div>
								<div class="item-wrapper" v-if="approvalData.flowType==='cc' || approvalData.flowType==='approval'">
									<div class="item-key">抄送人设置</div>
									<div class="item-content cc-container">
										<div class="approval-function-setting-content"
											v-for="approver in approvalData.ccTargets">
											<div class="approver-setting">
												<div class="header">
													<span>抄送人</span>
													<span 
														class="close-btn" 
														@click="removeCc(approver)"
														v-if="approvalData.ccTargets.length>1">×</span>
												</div>
												<div class="radio-line-group">
													<label v-for="target in approvalConfig.approvalTargets">
														<input :value="target" v-model="approver.target" type="radio">
														<span>{{target}}</span>
													</label>
												</div>
												<div class="sub-content">
													<div class="sub-content-top-line"></div>
													<div class="sub-approver approver-user-selector add-user"
														v-show="approver.target=='指定成员'">
														<p>
															<span>添加成员</span>
															<span class="light-text">（不能超过25人）</span>
														</p>
														<div class="add-approver-wrapper">
															<div class="add-approver-btn"
																@click="addApprover(approver.users)">+</div>
															<div class="add-approver-item"
																v-for="user in approver.users">
																<img
																	src="https://s3-imfile.feishucdn.com/static-resource/v1/v2_4cb935f7-a445-4c1f-a40c-ed52e7f0eb7g~?image_size=32x32&amp;cut_type=&amp;quality=&amp;format=image&amp;sticker_format=.webp">
																<div>{{user}}</div>
																<div class="close-btn">×</div>
															</div>
														</div>
													</div>
													<div class="sub-approver approver-user-selector role-user"
														v-show="approver.target=='角色'">
														<p>选择角色</p>
														<div class="add-approver-wrapper role-selector-wrapper">
															<div class="radio-line-group">
																<label>
																	<input value="单选"
																		name="fanwei-grouply1kedkhocyn7jao17i"
																		checked="true" type="radio">
																	<span>单选</span>
																</label>
																<label>
																	<input value="多选"
																		name="fanwei-grouply1kedkhocyn7jao17i"
																		type="radio">
																	<span>多选</span>
																</label>
															</div>
														</div>
														<p class="选择范围"></p>
														<div class="add-approver-wrapper role-selector-wrapper">
															<div class="radio-line-group" style="display: none;">
																<label>
																	<input value="全公司"
																		name="role-grouply1kedkhhjfsf44ewi"
																		checked="true" type="radio">
																	<span>全公司</span>
																</label>
																<label>
																	<input value="指定成员"
																		name="role-grouply1kedkhhjfsf44ewi"
																		type="radio">
																	<span class="">指定成员</span>
																</label>
																<label>
																	<input value="指定角色"
																		name="role-grouply1kedkhhjfsf44ewi"
																		type="radio">
																	<span>指定角色</span>
																</label>
															</div>
														</div>
														<div class="sub-approver approver-user-selector add-user"
															style="display: none;">
															<p>
																<span>添加成员</span>
																<span class="light-text">（不能超过25人）</span>
															</p>
															<div class="add-approver-wrapper">
																<div class="add-approver-btn">+</div>
															</div>
														</div>
													</div>
													<div class="sub-approver approver-user-selector user-group"
														v-show="approver.target=='用户组'">
														<p>用户组</p>
														<div class="add-approver-wrapper usergroup-selector-wrapper">
															<div class="supervisor-select"><select>
																	<option>用户组1</option>
																	<option>用户组2</option>
																	<option>用户组3</option>
																</select></div>
														</div>
														<div class="role-info">
															<span>仅展示可见范围内的用户组，可前往</span>
															<a href="https://www.baidu.com">管理后台</a>
															<span>进行配置</span>
														</div>
													</div>
												</div>
											</div>
										</div>

									</div>
									<div class="item-content">
										<div class="add-operator" @click="addCcTargetPanel">＋ 添加抄送人</div>
									</div>
								</div>
								<div class="item-wrapper" v-if="approvalData.flowType==='cc' || approvalData.flowType==='approval'">
									<div class="item-key">提示</div>
									<div class="item-content more-info">
										<p>抄送的人数最多支持100人以内</p>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="approval-editor-footer-wrapper">
						<div class="btn-group">
							<button class="fz-btn primary" type="button" @click="save">保存</button>
							<button class="fz-btn cancel" type="button" @click="cancel">取消</button>
							<span v-show="errMsg!=null"
								style="color: red;font-size: 12px;display: inline-block;padding: 0 10px 0 10px;">{{errMsg}}</span>
						</div>
					</div>
				</div>
			</div>
		</div>
		<button class="fz-btn primary submit-btn" onclick="submitFlow()" type="button" @click="save">保存</button>
	</body>
</html>
<script src="index.js" type="text/javascript" charset="utf-8"></script>
<!-- <script src="approvalAttributeEditor.js" type="text/javascript" charset="utf-8"></script> -->
<script src="vue.min.js"></script>
<script type="text/javascript">
	// var rootNode = new FlowNodes();
	// document.body.appendChild(rootNode.getElement());

	// var startFlowNode = new FlowNode("提交", "start");
	// startFlowNode.setData({
	// 	approvalName: "提交",
	// })
	// rootNode.addFlowNode(startFlowNode);

	// var approvalFlowNode1 = new FlowNode("审批节点1", "approval");
	// rootNode.addFlowNode(approvalFlowNode1)

	// var approvalFlowNode2 = new FlowNode("审批节点2", "approval");
	// rootNode.addFlowNode(approvalFlowNode2)

	// var ccFlowNode = new FlowNode("抄送后勤部", "cc");
	// rootNode.addFlowNode(ccFlowNode)

	// var flowNodeRoute = new FlowNodeRoute();
	// let branchs = flowNodeRoute.getBranchs();
	
	// let flowNodes1 = new FlowNodes("route",branchs);
	// let conditionFlowNode1 = new FlowConditionNode("条件分支","condition",flowNodes1);
	// let flowNode2 = new FlowNode("审批3","approval",flowNodes1);
	// flowNodes1.addFlowNode(conditionFlowNode1)
	// flowNodes1.addFlowNode(flowNode2)
	// branchs.addFlowNodes(flowNodes1);
	
	// let flowNodes2 = new FlowNodes("route",branchs);
	// let conditionFlowNode2 = new FlowConditionNode("条件分支2","condition",flowNodes2);
	// let flowNode3 = new FlowNode("审批3","approval",flowNodes2);
	// flowNodes2.addFlowNode(conditionFlowNode2)
	// flowNodes2.addFlowNode(flowNode3)
	// branchs.addFlowNodes(flowNodes2);
	
	
	// rootNode.addFlowNode(flowNodeRoute)
	

	// var endFlowNode = new FlowNode("结束", "end");
	// rootNode.addFlowNode(endFlowNode)


	var approvalAttributes = new Vue({
		el: "#approvalAttribute",
		data() {
			return {
				errMsg: null,
				approvalAttributeDisplay: false,
				approvalConfig: {
					approvalTargets: ['上级', '部门负责人', '角色', '用户组', '指定成员', '提交人自选', '提交人本人', '节点审批人', '连续多级上级',
						'连续多级部门负责人', '表单内联系人', '表单内部门'
					]
				},
				approvalNameEditorFlag: false,
				approvalData: {
					flowType:"approval",
					approvalName: "审批",
					approvalMethod: "人工审批",
					approvalTargets: [{
						target: "指定成员",
						users: []
					}],
					approverNoExistWhen: {
						action: "自动通过"
					},
					approverPresentWhen: {
						action: "自动跳过"
					},
					approverMultipleWhen: {
						action: "会签"
					},
					ccTargets: [],
					conditionGroups:[
						[
							{
								field:"姓名",
								expression:"等于",
								target:"李飞飞"
							},
							{
								field:"姓名",
								expression:"等于",
								target:"李飞飞"
							}
						]
					]
				},
				//审批节点
				flowNode: null
			}
		},
		methods: {
			addApproverTargetPanel() {
				this.approvalData.approvalTargets.push({
					target: "指定成员",
					users: []
				})
			},
			removeApprover(approver){
				this.approvalData.approvalTargets=this.approvalData.approvalTargets.filter(item => item !== approver)
			},
			addCcTargetPanel() {
				this.approvalData.ccTargets.push({
					target: "指定成员",
					users: []
				})
			},
			removeCc(cc){
				this.approvalData.ccTargets=this.approvalData.ccTargets.filter(item => item !== cc)
			},
			save() {
				console.log(JSON.stringify(this.approvalData));
				if(this.approvalData.flowType==='approval'){
					//数据校验
					for (var i = 0; i < this.approvalData.approvalTargets.length; i++) {
						let approvalTarget = this.approvalData.approvalTargets[i]
					
						if (approvalTarget.users.length == 0) {
							this.errMsg = "请选择审批人";
							return;
						} else {
							this.errMsg = null;
						}
					}
				}
				this.flowNode.setData(this.approvalData);
				this.approvalAttributeDisplay = false;
			},
			cancel() {
				this.approvalAttributeDisplay = false;
			},
			show(flowNode) {
				console.log("flowNode",flowNode)
				this.approvalAttributeDisplay = true;
				this.flowNode = flowNode;
				this.approvalData = JSON.parse(JSON.stringify(this.flowNode.getData()));
			},
			copyObject(source, target) {
				for (let key in source) {
					let val = source[key];
					console.log("object type:", typeof(val))
					if (val) {
						if (typeof(val) == "object") {
							this.copyObject(val, target[key])
						} else {
							target[key] = val;
						}
					}
				}
			},
			addApprover(users) {
				console.log("users：", users)
				let user = prompt("清输入人员姓名：");
				users.push(user)
			},
			addCondition(conditionGroup){
				conditionGroup.push({})
			}
		}
	})

	//提取数据
	//var flowNodes = rootNode.getFlowNodes()
	var spe = "";

	function consoleTree(flowNodes, resultArr) {
		for (var i = 0; i < flowNodes.length; i++) {
			let flowNode = flowNodes[i]
			let flowType = flowNode.getFlowType();

			let approvalAttributeData = flowNode.getApprovalAttributeData();
			let flowData = {
				name: approvalAttributeData?approvalAttributeData.approvalName:null,
				type: flowType,
				approvalAttrubuteData: approvalAttributeData,
			}
			if(flowType == "condition"){
				console.log("flowNode",flowNode)
				flowData.isDefault = flowNode.getDefault();
			}
			resultArr.push(flowData)
			if (flowType == "branch") {
				flowData.type = "branch";
				flowData.branch = [];
				let branchs = flowNode.getBranchs();

				for (var j = 0; j < branchs.getFlowNodesList().length; j++) {
					let fns = branchs.getFlowNodesList()[j];
					flowData.branch[j] = []
					consoleTree(fns.getFlowNodes(), flowData.branch[j]);
				}
			}
		}
	}

	function submitFlow() {
		var resultArr = [];
		consoleTree(rootNode.getFlowNodes(), resultArr)
		console.log(JSON.stringify(resultArr))
	}
	
	
	
	var rootNode = new FlowNodes();
	document.body.appendChild(rootNode.getElement());
	
	/**
	 * 渲染审批流
	 * @param {Object} flowData 审批流数据
	 */
	function renderFlow(parentNode,flowDatas){
		for (var i = 0; i < flowDatas.length; i++) {
			let node = flowDatas[i]
			
			//渲染条件分支
			if(node.type === "branch"){
				let branchsData = node.branch;
				var flowNodeRoute = new FlowNodeRoute();
				let branchs = flowNodeRoute.getBranchs();
				for (var j = 0; j < branchsData.length; j++) {
					let nodeDatas = branchsData[j]
					let _flowNodes = new FlowNodes("route",branchs);
					renderFlow(_flowNodes,nodeDatas)
					branchs.addFlowNodes(_flowNodes);
				}
				parentNode.addFlowNode(flowNodeRoute);
			}else if(node.type === "condition"){
				var flowNode = new FlowConditionNode(node.isDefault?null:node.name, node.type,parentNode);
				flowNode.setData(node.approvalAttrubuteData)
				parentNode.addFlowNode(flowNode);
			}else{
				var flowNode = new FlowNode(node.name, node.type,parentNode);
				flowNode.setData(node.approvalAttrubuteData)
				parentNode.addFlowNode(flowNode);
			}
		}
	}
	
	let flowDatas=[{"name":"提交","type":"start","approvalAttrubuteData":{"approvalName":"提交"}},{"name":"顶头上司审批","type":"approval","approvalAttrubuteData":{"approvalName":"顶头上司审批","flowType":"approval","approvalMethod":"人工审批","placeholder":"提交人：请选择审批人","approvalTargets":[{"target":"指定成员","users":["王鹤棣"]}],"approverNoExistWhen":{"action":"自动通过"},"approverPresentWhen":{"action":"自动跳过"},"approverMultipleWhen":{"action":"或签（一名审批人同意即可）"},"ccTargets":[{"target":"指定成员","users":[""]}]}},{"name":null,"type":"branch","approvalAttrubuteData":null,"branch":[[{"name":"条件分支","type":"condition","approvalAttrubuteData":{"approvalName":"条件分支","flowType":"condition","placeholder":"请设置条件"},"isDefault":false},{"name":"审批3","type":"approval","approvalAttrubuteData":{"approvalName":"审批3","flowType":"approval","approvalMethod":"人工审批","placeholder":"提交人：请选择审批人","approvalTargets":[{"target":"指定成员","users":[]}],"approverNoExistWhen":{"action":"自动通过"},"approverPresentWhen":{"action":"自动跳过"},"approverMultipleWhen":{"action":"会签"},"ccTargets":[]}}],[{"name":"条件分支","type":"condition","approvalAttrubuteData":{"approvalName":"条件分支","flowType":"condition","placeholder":"请设置条件"},"isDefault":true},{"name":null,"type":"branch","approvalAttrubuteData":null,"branch":[[{"name":"条件分支","type":"condition","approvalAttrubuteData":{"approvalName":"条件分支","flowType":"condition","placeholder":"请设置条件"},"isDefault":false},{"name":"审批3","type":"approval","approvalAttrubuteData":{"approvalName":"审批3","flowType":"approval","approvalMethod":"人工审批","placeholder":"提交人：请选择审批人","approvalTargets":[{"target":"指定成员","users":["小崽崽"]}],"approverNoExistWhen":{"action":"自动通过"},"approverPresentWhen":{"action":"自动跳过"},"approverMultipleWhen":{"action":"会签"},"ccTargets":[]}}],[{"name":"条件分支","type":"condition","approvalAttrubuteData":{"approvalName":"条件分支","flowType":"condition","placeholder":"请设置条件"},"isDefault":true},{"name":"合适审批","type":"approval","approvalAttrubuteData":{"approvalName":"合适审批","flowType":"approval","approvalMethod":"人工审批","placeholder":"提交人：请选择审批人","approvalTargets":[{"target":"指定成员","users":["摩多力气"]}],"approverNoExistWhen":{"action":"自动通过"},"approverPresentWhen":{"action":"自动跳过"},"approverMultipleWhen":{"action":"会签"},"ccTargets":[]}}]]},{"name":"审批3","type":"approval","approvalAttrubuteData":{"approvalName":"审批3","flowType":"approval","approvalMethod":"人工审批","placeholder":"提交人：请选择审批人","approvalTargets":[{"target":"指定成员","users":[]}],"approverNoExistWhen":{"action":"自动通过"},"approverPresentWhen":{"action":"自动跳过"},"approverMultipleWhen":{"action":"会签"},"ccTargets":[]}},{"name":"抄送","type":"cc","approvalAttrubuteData":{"approvalName":"抄送","flowType":"cc","placeholder":"抄送人：请选择抄送人","ccTargets":[{"target":"指定成员","users":[]}]}}],[{"name":"条件分支","type":"condition","approvalAttrubuteData":{"approvalName":"条件分支","flowType":"condition","placeholder":"请设置条件"},"isDefault":false},{"name":"审批3","type":"approval","approvalAttrubuteData":{"approvalName":"审批3","flowType":"approval","approvalMethod":"人工审批","placeholder":"提交人：请选择审批人","approvalTargets":[{"target":"指定成员","users":[]}],"approverNoExistWhen":{"action":"自动通过"},"approverPresentWhen":{"action":"自动跳过"},"approverMultipleWhen":{"action":"会签"},"ccTargets":[]}}],[{"name":"条件分支","type":"condition","approvalAttrubuteData":{"approvalName":"条件分支","flowType":"condition","placeholder":"请设置条件"},"isDefault":false},{"name":"审批3","type":"approval","approvalAttrubuteData":{"approvalName":"审批3","flowType":"approval","approvalMethod":"人工审批","placeholder":"提交人：请选择审批人","approvalTargets":[{"target":"指定成员","users":[]}],"approverNoExistWhen":{"action":"自动通过"},"approverPresentWhen":{"action":"自动跳过"},"approverMultipleWhen":{"action":"会签"},"ccTargets":[]}}]]},{"name":"后勤指挥部审批","type":"approval","approvalAttrubuteData":{"approvalName":"后勤指挥部审批","flowType":"approval","approvalMethod":"人工审批","placeholder":"提交人：请选择审批人","approvalTargets":[{"target":"指定成员","users":["刘不占"]}],"approverNoExistWhen":{"action":"自动通过"},"approverPresentWhen":{"action":"自动跳过"},"approverMultipleWhen":{"action":"会签"},"ccTargets":[]}},{"name":"结束","type":"end","approvalAttrubuteData":{"approvalName":"结束","flowType":"end","placeholder":"流程结束","ccTargets":[{"target":"指定成员","users":[]}]}}];
	
	renderFlow(rootNode,flowDatas)
</script>